package models

type Messages struct {
	ID int `gorm:"primary_key;AUTO_INCREMENT;cloumn:id;type:int(11) unsigned;not null" form:"id" json:"id"`
	MsgID string `gorm:"cloumn:msg_id;type:varchar(30)" form:"msg_id" json:"msg_id"`
	UserID int `gorm:"cloumn:user_id;type:int(11) unsigned;not null" form:"user_id" json:"user_id"`
	DstId int `gorm:"cloumn:dst_id;type:int(11) unsigned;not null" form:"dst_id" json:"dst_id"`
	Content string `gorm:"cloumn:content;type:varchar(255)" form:"content" json:"content"`
	Pic string `gorm:"cloumn:pic;type:varchar(255)" form:"pic" json:"pic"`
	IsR int `gorm:"cloumn:is_r;type:tinyint(2) unsigned;" form:"is_r" json:"is_r"`
	CreatedAt int64 `gorm:"cloumn:created_at;type:int(11) unsigned;not null" form:"created_at" json:"created_at"`
	UpdatedAt int64 `gorm:"cloumn:updated_at;type:int(11) unsigned;not null" form:"updated_at" json:"updated_at"`
}

// 设置表名
func (m *Messages) TableName() string {
	return "messages"
}

